#ifndef POINTCLOUDDIST_H
#define POINTCLOUDDIST_H

#include "pointCloud.h"

#include <eq/eq.h>

namespace eqPc
{

	class pc::PointCloud;

	class PointCloudDist : public co::Object
	{
	public:
		PointCloudDist() {
					_pointCloud=0;
					EQINFO<<"Dist created"<<std::endl;
		}
		PointCloudDist(pc::PointCloud* p) {
			
			EQINFO<<"Dist created"<<std::endl;
			_pointCloud=p;}
		
		virtual ~PointCloudDist();

		void registerPointCloud(co::LocalNodePtr node);
		void deregisterPointCloud();

		pc::PointCloud* mapPointCloud( co::LocalNodePtr node,
										  const eq::uint128_t& modelID );

		void unmapPointCloud();
	protected:
		virtual void getInstanceData(co::DataOStream& os);
		virtual void applyInstanceData(co::DataIStream& is);
	private:

		pc::PointCloud* _pointCloud;

	};


}



#endif